home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / System / BoingBag1 / Contributions / InstallerNG / Install < prev    next >
Text File  |  1999-11-10  |  12KB  |  313 lines

  1.  
  2. /*********************************************************************************************
  3.  *
  4.  * installation script for the InstallerNG $VER: InstallerNG-Script 1.2 (08.10.99)
  5.  *
  6.  * note, that this script makes use of seveal new features of the InstallerNG
  7.  * like multilined comments and enhanced pattern-match functionality of the DATABASE
  8.  * function
  9.  *
  10.  *********************************************************************************************/
  11.  
  12. ; -----------------------------------------------------------------------------
  13. ; some default settings
  14.  
  15. (set @app-name     "Installer NG"
  16.      @default-dest "C:"
  17. )
  18.  
  19. ; -----------------------------------------------------------------------------
  20. ; initialize the sound
  21.  
  22. (showmedia "#yeah" "media/yeah.snd" "upper_left" "none" 0)
  23.  
  24. ; -----------------------------------------------------------------------------
  25. ; localized strings; by default, everything is english, but if possible,
  26. ; overwrite the english strings by user-preferred ones
  27.  
  28. (if true
  29.  
  30.     (
  31.       (set #msg_welcome (cat "Welcome to the Installation of the InstallerNG\n\n"
  32.                              "The InstallerNG wants to be a substitution of\n"
  33.                              "the original Installer by C=\n"
  34.                              "It offers many new features, looks much better and is\n"
  35.                              "smaller than the C= Installer"
  36.                              "\n\n\n\n.oO please turn on the Amiga sound Oo."
  37.                         )
  38.       )
  39.       (set #msg_askfile_prompt "Where is the default Installer located?")
  40.       (set #msg_askfile_help (cat "Please select the original Installer by C=. "
  41.                                   "This script will make a backup copy of the "
  42.                                   "Installer and then, it will replace the "
  43.                                   "original by the new InstallerNG."
  44.                              )
  45.       )
  46.       (set #msg_copylib_prompt "Now copying the InstallerNG to \"%s\"")
  47.       (set #msg_copylib_help "...")
  48.  
  49.       (set #msg_catalog_prompt "Which catalog-file do you want to install?")
  50.       (set #msg_catalog_help "...")
  51.  
  52.       (set #msg_done (cat "Done!\n"
  53.                           "The InstallerNG replaced the original Installer\n"
  54.                           "and made a copy of the old one in \"%s\".\n\n"
  55.                           "Have fun with the new Installer and its features"
  56.                      )
  57.       )
  58.  
  59.       (set #msg_rename_prompt "Now renaming the C= installer")
  60.       (set #msg_rename_help "...")
  61.  
  62.       (set #msg_copytools_prompt "Which additional tools you want to install? (see Help)")
  63.       (set #msg_copytools_help (cat "CloseScreenPatch\nA patch, which avoids screen closing, while a window "
  64.                                     "is still open on that screen and helps you to save memory. Just add "
  65.                                     "'run <>nil: c:closescreenpatch' to the end of your 's:user-startup' file"
  66.                                     "\n\nGetSum\n"
  67.                                     "Calculates the checksum of any file, like the Installer does. "
  68.                                     "Usage: type 'getsum <file>' in your shell"
  69.                                )
  70.       )
  71.  
  72.       (set #msg_tooltypes_prompt "Which Tooltypes you want to preset?")
  73.       (set #msg_tooltypes_help "...")
  74.  
  75.       (set #msg_askchoice_prompt "Which GUI do you want to use?")
  76.       (set #msg_askchoice_help "...")
  77.  
  78.       (set #message_letsgo "Installation prepared. Ready to proceed?")
  79.  
  80.       (set #working_text "Now starting to install the new InstallerNG by Jens Tröger")
  81.     )
  82. )
  83.  
  84. (if (= @language "deutsch")
  85.  
  86.     (
  87.       (set #msg_welcome (cat "Willkommen zur Installation des InstallerNG\n\n"
  88.                              "Der InstallerNG soll ein Ersatz für den\n"
  89.                              "originalen Installer von C= sein\n"
  90.                              "Er bietet viele neue Eigenschaften, sieht viel besser aus\n"
  91.                              "und ist kleiner als der C= Installer"
  92.                              "\n\n\n\n.oO Bitte den Amiga-Ton anschalten Oo."
  93.                         )
  94.       )
  95.  
  96.       (set #msg_askfile_prompt "Wo befindet sich der Installer?")
  97.       (set #msg_askfile_help (cat "Bitte wählen Sie den originalen Installer von C=. "
  98.                                   "Dieses Skript macht eine Kopie des originalen "
  99.                                   "Installers und wird danach den originalen durch "
  100.                                   "den neuen InstallerNG ersetzen."
  101.                              )
  102.       )
  103.  
  104.       (set #msg_copylib_prompt "Kopiere jetzt den InstallerNG nach \"%s\"")
  105.       (set #msg_copylib_help "...")
  106.  
  107.       (set #msg_catalog_prompt "Zu welcher Sprache möchten Sie einen Katalog installieren?")
  108.       (set #msg_catalog_help (cat "Wählen Sie hier aus, welche Katalog Datei Sie installieren möchten. "
  109.                                   "Sinnigerweise sollten Sie 'deutsch' wählen."
  110.                              )
  111.       )
  112.  
  113.       (set #msg_done (cat "Fertig!\n"
  114.                           "Der InstallerNG hat Ihren originalen Installer\n"
  115.                           "ersetzt und eine Kopie des alten als \"%s\" erzeugt.\n\n"
  116.                           "Viel Spaß mit dem neuen Installer und seinen Möglichkeiten"
  117.                      )
  118.       )
  119.  
  120.       (set #msg_rename_prompt "Benenne nun den C= Installer um")
  121.       (set #msg_rename_help "...")
  122.  
  123.       (set #msg_copytools_prompt "Welche zusätzlichen Programme wollen Sie installieren?")
  124.       (set #msg_copytools_help (cat "CloseScreenPatch\nEin Patch, welcher verhindert, daß ein Screen geschlossen "
  125.                                     "wird, auf dem noch Fenster geöffnet sind und somit 'Speicherleichen' "
  126.                                     "vorbeugt. Einfach 'run <>nil: c:closescreenpatch' in 's:user-startup' einfügen"
  127.                                     "\n\nGetSum\n"
  128.                                     "Berechnet die Checksumme einer Datei, wie sie auch der Installer berechnet. "
  129.                                     "Nutzung: 'getsum <file>' in der Shell eingeben"
  130.                                )
  131.       )
  132.  
  133.       (set #msg_tooltypes_prompt "Welche Tooltypes möchten Sie voreinstellen? (siehe Hilfe)")
  134.       (set #msg_tooltypes_help "...")
  135.  
  136.       (set #msg_askchoice_prompt "Welche Oberfläche möchten Sie verwenden?")
  137.       (set #msg_askchoice_help "...")
  138.  
  139.       (set #message_letsgo "Installation vorbereitet. Soll nun weitergemacht werden?")
  140.  
  141.       (set #working_text "Beginne nun mit der Installation des InstallersNG von Jens Tröger")
  142.     )
  143. )
  144.  
  145. /*********************************************************************************************/
  146.  
  147. ;; (effect "center_center" "horizontal" $000000 $33FF33)
  148.  
  149. /*********************************************************************************************/
  150.  
  151. (user expert)
  152. (message #msg_welcome)
  153. (setmedia #yeah "play")
  154. (welcome)
  155.  
  156. ; -----------------------------------------------------------------------------
  157. ; the default settings
  158.  
  159. (set #default_installer "c:installer"
  160.      #default_catalog 0
  161.      #default_tools 0
  162.      #default_tooltypes 0
  163.      #default_gui 0
  164. )
  165.  
  166. ; -----------------------------------------------------------------------------
  167. ; first of all let the user make all the required settings
  168. ; for the installation
  169.  
  170. (swing
  171.  
  172.   (set @default-dest (pathonly (set #default_installer (askfile (prompt #msg_askfile_prompt)
  173.                                                                 (default #default_installer)
  174.                                                                 (help #msg_askfile_help)
  175.                                                        )
  176.                                )
  177.                      )
  178.   )
  179.  
  180.   (set #default_catalog (askoptions (prompt #msg_catalog_prompt)
  181.                                     (help #msg_catalog_help)
  182.                                     (default #default_catalog)
  183.                                     (choices (if (exists "catalogs/deutsch/installerng.catalog") "Deutsch" "")
  184.                                              (if (exists "catalogs/français/installerng.catalog") "Français" "")
  185.                                     )
  186.                         )
  187.   )
  188.  
  189.   (set #default_tools (askoptions (prompt #msg_copytools_prompt)
  190.                                   (help #msg_copytools_help)
  191.                                   (default #default_tools)
  192.                                   (choices "CloseScreenPatch" "GetSum")
  193.                       )
  194.   )
  195.  
  196.   (set #default_tooltypes (askoptions (prompt #msg_tooltypes_prompt)
  197.                                       (help #msg_tooltypes_help)
  198.                                       (default #default_tooltypes)
  199.                                       (choices "LAZYCOMPILE" "DEBUGMODE"
  200.                                                "CREATEUNSINSTALL" "COPYFILESCOMMENT"
  201.                                                "ALWAYSCONFIRM" "NOSYSDELETE"
  202.                                       )
  203.                           )
  204.   )
  205.  
  206.   (set #default_gui (askchoice (prompt #msg_askchoice_prompt)
  207.                                (help #msg_askchoice_help)
  208.                                (default #default_gui)
  209.                                (choices "BOOPSI by Savage (builtin)"
  210.                                         "MUI by Savage (BETA!)"
  211.                                )
  212.                     )
  213.   )
  214.  
  215.   (message #message_letsgo)
  216. )
  217.  
  218. ; -----------------------------------------------------------------------------
  219. ; now the installation process itself
  220.  
  221. (complete 0)
  222.  
  223. (set #installer_backup (cat #default_installer ".backup"))
  224.  
  225. (if (not (exists #installer_backup (noreq)))
  226.     (
  227.       (rename #default_installer #installer_backup (confirm average)
  228.                                                    (prompt #msg_rename_prompt)
  229.                                                    (help #msg_rename_help)
  230.       )
  231.     )
  232.  
  233. (complete 15)
  234.  
  235. (copylib (prompt (#msg_copylib_prompt #default_installer))
  236.          (help #msg_copylib_help)
  237.          (confirm average)
  238.          (source (if (database "cpu" "(68000|68010)")
  239.                      ("c/installerng.000")
  240.                      ("c/installerng.020")
  241.                  )
  242.          )
  243.          (dest (pathonly #default_installer))
  244.          (newname (fileonly #default_installer))
  245.          (infos)
  246. )
  247.  
  248. (complete 30)
  249.  
  250. (copyfiles (source "tools/")
  251.            (dest "C:")
  252.            (choices (if (bitand #default_tools 1) "CloseScreenPatch")
  253.                     (if (bitand #default_tools 2) "GetSum")
  254.            )
  255. )
  256.  
  257. (complete 45)
  258.  
  259. (if (exists (tackon #default_installer ".info"))
  260.  
  261.     (tooltype (dest #default_installer)
  262.               (setstack 50000)
  263.               (if (bitand #default_tooltypes  1) (settooltype "LAZYCOMPILE" "")
  264.                                                  (settooltype "(LAZYCOMPILE)" ""))
  265.               (if (bitand #default_tooltypes  2) (settooltype "DEBUGMODE" "")
  266.                                                  (settooltype "(DEBUGMODE)" ""))
  267.               (if (bitand #default_tooltypes  4) (settooltype "CREATEUNINSTALL" "")
  268.                                                  (settooltype "(CREATEUNINSTALL)" ""))
  269.               (if (bitand #default_tooltypes  8) (settooltype "COPYFILECOMMENT" "")
  270.                                                  (settooltype "(COPYFILECOMMENT)" ""))
  271.               (if (bitand #default_tooltypes 16) (settooltype "ALWAYSCONFIRM" "")
  272.                                                  (settooltype "(ALWAYSCONFIRM)" ""))
  273.               (if (bitand #default_tooltypes 32) (settooltype "NOSYSDELETE" "")
  274.                                                  (settooltype "(NOSYSDELETE)" ""))
  275.     )
  276.  
  277.     (nop)
  278. )
  279.  
  280. (complete 60)
  281.  
  282. (if (bitand #default_catalog 1)
  283.     (copylib (source "catalogs/deutsch/installerng.catalog")
  284.              (dest "locale:catalogs/deutsch")
  285.     )
  286. )
  287.  
  288. (if (bitand #default_catalog 2)
  289.     (copylib (source "catalogs/français/installerng.catalog")
  290.              (dest "locale:catalogs/français")
  291.     )
  292. )
  293.  
  294. (complete 75)
  295.  
  296. (select #default_gui
  297.  
  298.         (nop)
  299.  
  300.         (copylib (source "libs/mui/installergui.library")
  301.                  (dest "libs:")
  302.         )
  303. )
  304.  
  305. (complete 100)
  306.  
  307. (setmedia #yeah "play")
  308. (exit (#msg_done #installer_backup))
  309.  
  310.  
  311.  
  312.